import logging

from utils.download_tools import download_imgs
from utils.image_editors import concatenate_and_save
from utils.thread_util import get_executor


def download_cartoon(name, img_url_list):
    images_bytes = download_imgs(img_url_list)
    concatenate_and_save(name, images_bytes)


def download_cartoon_by_executor(name, img_url_list):
    executor = get_executor()
    future = executor.submit(download_cartoon, name, img_url_list)
    logging.info(name + " 已提交")
    return name, future



